/**
 * CircleMember.java
 * com.jamin.aabill.data
 *
 * Function： TODO 
 *
 *   ver     date      		author
 * ──────────────────────────────────
 *   		 2012-8-30 		wangjieming
 *
 * Copyright (c) 2012, TNT All Rights Reserved.
 */

package com.jamin.aabill.data;

import com.jamin.aabill.db.CircleMemberTableMetaData;

import android.database.Cursor;

/**
 * ClassName:CircleMember
 *
 * @author   wangjieming
 * @version  1.0
 * @since    v1.0
 * @Date	 2012-8-30 上午10:32:34 
 */
public class CircleMember {


	/**
	 * for insertDB
	 * Creates a new instance of CircleMember.
	 *
	 * @param name
	 * @param circle_id
	 * @param mobile
	 * @param description
	 */
	public CircleMember(String name , long circle_id , String mobile , String description ){
		setName(name);
		setCircle_id(circle_id);
		setMobile(mobile);
		setDescription(description);
		setCreate_at(System.currentTimeMillis());
	}

	public CircleMember(Cursor mCur){

		set_id(mCur.getLong(mCur.getColumnIndex(CircleMemberTableMetaData._ID)));
		setName(mCur.getString(mCur.getColumnIndex(CircleMemberTableMetaData.NAME)));
		setCircle_id(mCur.getLong(mCur.getColumnIndex(CircleMemberTableMetaData.CIRCLE_ID)));
		setMobile(mCur.getString(mCur.getColumnIndex(CircleMemberTableMetaData.MOBILE)));
		setDescription(mCur.getString(mCur.getColumnIndex(CircleMemberTableMetaData.DESCRIPTION)));
		setCreate_at(mCur.getLong(mCur.getColumnIndex(CircleMemberTableMetaData.CREATE_AT)));
	}


	private long _id;				//用户ID
	private String name;			//成员名
	private long circle_id;			//圈子ID
	private String mobile;			//成员手机
	private String description;		//成员描述
	private long create_at;			//创建时间


	public long get_id() {
		return _id;
	}
	public void set_id(long _id) {
		this._id = _id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public long getCircle_id() {
		return circle_id;
	}
	public void setCircle_id(long circle_id) {
		this.circle_id = circle_id;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public long getCreate_at() {
		return create_at;
	}
	public void setCreate_at(long create_at) {
		this.create_at = create_at;
	}



	@Override
	public String toString() {
		return "CircleMember{" +
				"_id='" + _id +
				", _id='" + _id +'\'' +
				", circle_id='" + circle_id + '\'' +
				", mobile='" + mobile + '\'' +
				", description='" + description +"\'" +
				", create_at='" + create_at + '\'' +"}";
	}

}

